import { createRouter, createWebHistory } from "vue-router";
import Login from "../views/Login.vue";
import Home from "../views/Home.vue";


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "Login",
      component: Login,
    },
    {
      path: "/Home",
      name: "Home",
      component: Home,
      children: [
        {
          path: "/Home/merchan",
          name: "merchan",
          component: () => import("../views/Merchandising.vue"),
        },
        {
          path: "/Home/items",
          name: "items",
          component: () => import("../views/Examinationitems.vue"),
        },
        {
          path: "/Home/target",
          name: "target",
          component: () => import("../views/Target.vue"),
        },
        {
          path: "/Home/OrganTarget",
          name: "OrganTarget",
          component: () => import("../views/OrganTarget.vue"),
        },
        {
          path: "/Home/GroupCompany",
          name: "GroupCompany",
          component: () => import("../views/GroupCompany.vue"),
        },
        {
          path: "/Home/GroupDetail",
          name: "GroupCheck",
          component: () => import("../views/GroupDetail.vue"),
        },
        {
          path: "/Home/AppInfoQuery",
          name: "AppInfoQuery",
          component: () => import("../views/AppInfoQuery.vue"),
        },
        {
          path: "/Home/PhyOrgan",
          name: "PhyOrgan",
          component: () => import("../views/PhyOrgan.vue"),
        },
        {
          path: "/Home/AdminManage",
          name: "AdminManage",
          component: () => import("../views/AdminManage.vue"),
        },
        {
          path: "/Home/AdminMenu",
          name: "AdminMenu",
          component: () => import("../views/AdminMenu.vue"),
        },
        {
          path: '/Home/RoleController',
          name: 'rolecontroller',
           component:()=>import('../views/RoleController.vue')
        }

      ],
    },
  ],
});

export default router;
